package com.misty.observer_pattern.observer2;

import java.util.Observable;

public class HanFeiZi extends Observable implements IHanfeizi {

    @Override
    public void haveBreakfast() {
        System.out.println("韩非子吃饭");
        super.setChanged();
        super.notifyObservers("报告：韩非子吃饭了");
    }

    @Override
    public void haveFun() {
        System.out.println("韩非子娱乐");
        super.setChanged();
        super.notifyObservers("报告：韩非子娱乐了");
    }


}
